﻿@using Resources
@using KPIS.GERP.Models.ViewModel
@model ExportGrid

<!-- Partial Buttons Menu Each Row-->
<div class="hidden-phone visible-desktop btn-group">
	<!-- Buttons On PC /-->
    @if (!string.IsNullOrWhiteSpace(Model.DetailsUrl))
    {
	    <a class="btn btn-mini btn-grey" data-rel="tooltip" href="@Model.DetailsUrl" role="button"><i class="icon-search bigger-120"></i></a>
    }
    @if (!string.IsNullOrWhiteSpace(Model.EditUrl))
    {
	    <a class="btn btn-mini btn-success" data-rel="tooltip" href="@Model.EditUrl" role="button"><i class="icon-edit bigger-120"></i></a>
    }
    @if (!string.IsNullOrWhiteSpace(Model.DeleteUrl))
    {
	    <a class="btn btn-mini btn-danger" data-rel="tooltip"
	       onclick="bootbox.confirm('@PopupMessageLocalization.ConfirmDelete', function(result) { if (result) window.location.href='@Model.DeleteUrl'; });" 
	       role="button"><i class="icon-trash bigger-120"></i>
	    </a>
    }
</div>
<div class="hidden-desktop visible-phone">
	<!-- Buttons/Tooltip On Tablet (or small monitor) /-->
	<div class="inline position-relative">
		<button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
			<i class="icon-caret-down icon-only bigger-120"></i>
		</button>
		<ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
			<li>
                @if (!string.IsNullOrWhiteSpace(Model.DetailsUrl))
                {
				    <a href="@Model.DetailsUrl" class="tooltip-grey" data-rel="tooltip" title="@IndexLocalization.Details" data-placement="left">
					    <span class="grey">
						    <i class="icon-search"></i>
					    </span>
				    </a>
                }
			</li>

			<li>
                @if (!string.IsNullOrWhiteSpace(Model.EditUrl))
                {
				    <a href="@Model.EditUrl" class="tooltip-success" data-rel="tooltip" title="@IndexLocalization.Edit" data-placement="left">
					    <span class="green">
						    <i class="icon-edit"></i>
					    </span>
				    </a>
                }
			</li>

			<li>
                @if (!string.IsNullOrWhiteSpace(Model.DeleteUrl))
                {
				    <a href="@Model.DeleteUrl" class="tooltip-error" data-rel="tooltip" title="@IndexLocalization.Delete" data-placement="left">
					    <span class="red">
						    <i class="icon-trash"></i>
					    </span>
				    </a>
                }
			</li>
		</ul>
	</div>
</div>
<!--/Partial Export Buttons Each Row-->